]> dgit.raspbian.org Git - gnome-shell.git/commit
misc: Toggle IBus OSK capability on OSK visibility
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 9 Aug 2022 14:00:33 +0000 (16:00 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 10 Aug 2022 10:14:40 +0000 (10:14 +0000)
commit23bfd08b3c9b5b10f2afc3b4c01544742caef680
tree7f50a2f7306b28c94b7bd1cea4d2d9896cba9262
parent4871eba8bf51eed1c31b875a81f9d814d7705ac8
misc: Toggle IBus OSK capability on OSK visibility

Newer versions of IBus (> 1.5.26) have the IBUS_CAP_OSK capability
which can be used to hint the active IM about an OSK driving input as
opposed to a physical keyboard. This may be used by IMs to tweak their
behavior to suit OSKs better.

Add the GNOME Shell side handling for this capability, and toggle it
on whenever the OSK is visible.

Since this is a far too new enum value and we don't want such new
IBus dependency, this change plays fast and loose with JS guarantees,
since a logical OR with an undefined value results in the other operand
unmodified it will work for older versions where the capability does not
exist and thus we want nothing extra enabled.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2415>
js/misc/inputMethod.js
js/ui/keyboard.js